<?php
namespace app\admin\model;

use think\Model;
use think\Db;

class Goods extends Model
{
	protected $table = 'goods';

	/**
	 * 查询所有售卖单
	 * @return [type] [description]
	 */
	public function goodsList()
	{
		$res = $this->field(['a.id','b.name','a.goods_num','a.date','a.exchange','a.status'])
			->alias('a')
			->join('user_home b', 'a.user_id=b.id')
			->select();
		return $res;
	}

	/**
	 * 根据id修改状态
	 * @param  [type] $id [description]
	 * @return [type]     [description]
	 */
	public function editStatus($id)
	{

	}
}